using System;
using UnityEngine;

[Serializable]
public class ReferencableObject
{
	[HideInInspector]
	public string referenceName;

	[HideInInspector]
	public string id;

	public bool hasValidId
	{
		get
		{
			return !string.IsNullOrEmpty(id);
		}
	}

	public void CreateId()
	{
		id = Guid.NewGuid().ToString();
	}

	public virtual ReferencableObject GetReference()
	{
		return this;
	}
}
